package com.dayuanit.dy14.atm.demo2.dy14atmcommon.util;

import java.util.Random;

public class CardUtils {

    private static final int card_num_size = 6;

    public CardUtils() {}

    public static String createCardNum() {
        return createCardNum(card_num_size);
    }

    public static String createCardNum(int cardSize) {
        //66000
        String cardNum = "";
        Random random = new Random();
        for (int i = 0; i < cardSize; i++) {
            int number = random.nextInt(10);
            cardNum += number;
        }
        return cardNum;
    }

    public static void main(String[] args) throws  Exception{
        System.out.println(CardUtils.createCardNum());
    }
}
